package com.blrs.system.mapper;

import com.blrs.system.domain.SysUploadFile;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 附件Mapper接口
 * 
 * @author yuxiang.chen
 * @date 2023-07-20
 */
public interface SysUploadFileMapper 
{
    /**
     * 查询附件
     * 
     * @param id 附件主键
     * @return 附件
     */
    public SysUploadFile selectSysUploadFileById(String id);

    /**
     * 查询附件列表
     * 
     * @param sysUploadFile 附件
     * @return 附件集合
     */
    public List<SysUploadFile> selectSysUploadFileList(SysUploadFile sysUploadFile);

    /**
     * 新增附件
     * 
     * @param sysUploadFile 附件
     * @return 结果
     */
    public int insertSysUploadFile(SysUploadFile sysUploadFile);

    /**
     * 修改附件
     * 
     * @param sysUploadFile 附件
     * @return 结果
     */
    public int updateSysUploadFile(SysUploadFile sysUploadFile);

    /**
     * 删除附件
     * 
     * @param id 附件主键
     * @return 结果
     */
    public int deleteSysUploadFileById(String id);
    public int deleteSysUploadFileByBusinessId(String businessId);

    /**
     * 批量删除附件
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysUploadFileByIds(String[] ids);

    /**
     *否存在附件信息
     * @param businessCode 类型编号
     * @return
     */
    public Long getCount(@Param("businessCode") String businessCode);

    /**
     * 查询文件路径
     */
    String selectUrl(String businessId);

    String selectUrlByCode(@Param("businessCode")String businessCode,@Param("businessId") String businessId);

    SysUploadFile  selectUrlByCodePay(@Param("businessCode") String businessCode, @Param("businessId") String businessId);

    int selectUrlByCodeCount(@Param("businessCode") String businessinfo, @Param("businessId")String uploadFile);
}
